<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="icms.ORM.Category" %>
<%@ page import="icms.service.CategoryService" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title>addMessagePanel</title>
</head>
  <body>
	<div align="center">
	<!-- 显示栏目信息   -->
<form action="messagePanelMan.do?method=addMessagePanel" method="post">
<table width="56%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
<tr bgcolor="#E7E7E7">
	<td height="24" colspan="2" background="skin/images/tbg.gif"><input type="hidden" name="msgPanelID" value="" />添加短文panel</td>
</tr>

<tr height="32" bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';">
	<td width="20%" align="right">名  称：</td>
	<td width="80%" align="left">
		<input type="text" name="msgPanelTitle" style="width:160px" maxlength="20" value="" />
		<%
			String nameMsg=(String)session.getAttribute("messagePanelnameError");
			if(nameMsg!=null&&(!nameMsg.equals(""))){
				out.write("<font color='red'>"+nameMsg+"</font>");
				session.setAttribute("messagePanelnameError",null);
			}
		%>
	</td>
</tr>

<tr height="32" bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';">
	<td width="20%" align="right">所有页面：</td>
	<td width="80%" align="left">
		<select name="msgPanelPageID" style="width:160px">
			<% //所有一级栏目页
					CategoryService service=new CategoryService();
					List categoryList=service.getAllParentCategory();
					for(int i=0;i<categoryList.size();i++){
						Category thisCategory=(Category)categoryList.get(i);
						//栏目id
						int value=thisCategory.getCategoryID();
						//栏目名称
						String text=thisCategory.getCategoryName();
						out.write("<option value='"+value+"'>"+text+"</option>");
					}
				//首页
				out.write("<option value='0'>首页</option>");
			 %>
		</select>
	</td>
</tr>

</tr>
<tr height="32" bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';">
	<td  align="right">超链接：</td>
	<td width="80%" align="left">
		<input type="text" name="msgPanelLink" style="width:160px" maxlength="30" value="" />
	</td>
</tr>
<tr height="80" bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';">
	<td  align="right" valign="top">正文：</td>
	<td  align="left" valign="top">
		<textarea name="msgPanelBody" style="width:400px; height:240px;"></textarea>
	</td>
</tr>
<tr height="20" bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';">
	<td  align="center" colspan="2">
		<input type="submit" value="保  存"  />&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="reset" value="取  消"  />
	</td>
</tr>
<tr height="20">
	<td  align="center" colspan="2">
		<%
			String news=(String)session.getAttribute("addMessagePanelNews");
			if(news!=null && (!news.equals("")) ){
				out.write("<font color='red'>"+news+"</font>");
			}
			session.setAttribute("addMessagePanelNews",null);
		 %>
		&nbsp;
	</td>
</tr>
</table>
</div>
</form>
  </body>
</html>
